
export const debounce = async (func: { (): void; apply?: any }, delay: number | undefined) => {
  let timer: any;
  return () => {
    clearTimeout(timer);
    timer = setTimeout(() => {
      func.apply(this, arguments);
    }, delay);
  };
};


